<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="radio">
                {foreach name="typeList" item="vo"}
                <label for="row[type]-{$key}"><input id="row[type]-{$key}" name="row[type]" type="radio" value="{$key}" {in name="key" value="0"}checked{/in} onchange="showDiv({$key})"  /> {$vo}</label> 
                {/foreach}
            </div>
        </div>
    </div>
 
    <div class="form-group type-list-3" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('实物')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-detail_id"  data-source="detail/index" class="form-control selectpage" name="row[detail_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group type-list-0">
        <label class="control-label col-xs-12 col-sm-2">{:__('送多少积分')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-score"  class="form-control"  data-use-current="true" name="row[score]" type="num" value="">
        </div>
    </div>
    <div class="form-group type-list-1" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('送多少水滴')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-water_num"  class="form-control"  data-use-current="true" name="row[water_num]" type="num" value="">
        </div>
    </div>
    <div class="form-group type-list-2" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('水票号')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-ticket_id"  data-source="ticket/index" class="form-control selectpage" data-field="title" name="row[ticket_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group " >
        <label class="control-label col-xs-12 col-sm-2">{:__('中奖概率(%)')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-probability"   class="form-control " name="row[probability]" type="int" value="">
        </div>
    </div>
    <div class="form-group" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-create_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[create_time]" type="text" value="{:date('Y-m-d H:i:s')}">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>

<script>
      function showDiv(value) {
        
        $('[class*="form-group type-list-"]').hide();
   
    $('.type-list-' + value).show();
      
       
    }
</script>